import { DEFAULT_LAYOUT } from '../base'
import { AppRouteRecordRaw } from '../types'
import permissionType from "@/utils/permissionType";

const MSGADMINDATA: AppRouteRecordRaw = {
  path: '/msgadmin',
  name: 'msgadmin',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '消息管理',
    requiresAuth: true,
    icon: 'icon-message',
    order: 4,
  },
  children: [
    {
      path: 'cgmsglist',
      name: 'cgmsglist',
      component: () => import('@/views/msgadmin/cgmsglist.vue'),
      meta: {
        locale: '济宁采购消息',
        requiresAuth: true,
        roles: [permissionType.sysAdmin, permissionType.caiGouOrderAll],
      },
    },
    {
      path: 'errorlist',
      name: 'errorlist',
      component: () => import('@/views/msgadmin/errorList.vue'),
      meta: {
        locale: '采购错误消息',
        requiresAuth: true,
        roles: [permissionType.sysAdmin, permissionType.caiGouOrderError],
      },
    },
    {
      path: 'cgzbmsglist',
      name: 'cgzbmsglist',
      component: () => import('@/views/msgadmin/cgzbmsglist.vue'),
      meta: {
        locale: '总部采购消息',
        requiresAuth: true,
        roles: [permissionType.sysAdmin, permissionType.caiGouOrderZB],
      },
    },
  ],
}

export default MSGADMINDATA
